<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改书籍')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-book-edit" th:object="${book}">
            <input id="bookId" name="bookId" th:field="*{bookId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">书名：</label>
				<div class="col-sm-8">
					<input id="bookName" name="bookName" th:field="*{bookName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">单价：</label>
				<div class="col-sm-8">
					<input id="bookPrice" name="bookPrice" th:field="*{bookPrice}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">作者：</label>
				<div class="col-sm-8">
					<input id="author" name="author" th:field="*{author}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">出版社：</label>
				<div class="col-sm-8">
					<input id="publishing" name="publishing" th:field="*{publishing}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">卖家店铺：</label>
				<div class="col-sm-8">
					<input id="storeId" name="storeId" th:field="*{storeId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">销量：</label>
				<div class="col-sm-8">
					<input id="sales" name="sales" th:field="*{sales}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">出版日期：</label>
				<div class="col-sm-8">
					<input id="publicationDate" name="publicationDate" th:field="*{publicationDate}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">余量：</label>
				<div class="col-sm-8">
					<input id="count" name="count" th:field="*{count}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">评分：</label>
				<div class="col-sm-8">
					<input id="score" name="score" th:field="*{score}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">：</label>
				<div class="col-sm-8">
					<input id="classification" name="classification" th:field="*{classification}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/book";
		$("#form-book-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-book-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
